#include"SLT.h"
void test3() {
	SListNode* n1 = BuySListNode(1);
	SListNode* n2 = BuySListNode(2);
	n1->next = n2;
	n2->next = NULL;

	SListInsertAfter(n1, 3);
	SListInsertAfter(n2, 4);

	SListPrint(n1);

	SListEraseAfter(n1);
	SListEraseAfter(n2);

	SListPrint(n1);

	SLTInsert(&n1, n2, 5);

	SListPrint(n1);

	SLTErase(&n1, n2);

	SListPrint(n1);

	/*SLTErase(&n1, n1);
	SListPrint(n1);*/

	SLTDestroy(&n1);
}


void test2() {
	SListNode* n1 = BuySListNode(1);
	SListNode* n2 = BuySListNode(2);
	n1->next = n2;
	n2->next = NULL;

	SListPushBack(&n1, 3);
	SListPushBack(&n1, 4);

	SListPrint(n1);

	SListPopBack(&n1);
	SListPopBack(&n1);

	SListPrint(n1);

	SListPopFront(&n1);

	SListPrint(n1);

	SLTDestroy(&n1);
}
void test1() {
	SListNode* n1  = BuySListNode(1);
	SListNode* n2  = BuySListNode(2);
	n1->next = n2;
	n2->next = NULL;

	SListPrint(n1);

	SLTDestroy(&n1);
}

int main() {
	test3();
	return 0;
}